#include "CustomEvent.h"

CustomEvent::CustomEvent() : QEvent(CSTM_EVENT_BASE)
{

}
CustomEvent::~CustomEvent()
{

}

DeviceHeartbeatEvent::DeviceHeartbeatEvent(const hv::SocketChannelPtr& channel, const QString& imei) : QEvent(CSTM_EVENT_DEVICE_HEARTBEAT), _channel(channel), _imei(imei)
{

}

DeviceHeartbeatEvent::~DeviceHeartbeatEvent()
{

}

QString DeviceHeartbeatEvent::imei()
{
    return _imei;
}

hv::SocketChannelPtr DeviceHeartbeatEvent::channel()
{
    return _channel;
}

ConnectEvent::ConnectEvent(const hv::SocketChannelPtr& channel) : QEvent(CSTM_EVENT_CONNECT), _channel(channel)
{

}

ConnectEvent::~ConnectEvent()
{

}

hv::SocketChannelPtr ConnectEvent::channel()
{
    return _channel;
}

DisconnectEvent::DisconnectEvent(const hv::SocketChannelPtr& channel) : QEvent(CSTM_EVENT_DISCONNECT), _channel(channel)
{

}

DisconnectEvent::~DisconnectEvent()
{

}

hv::SocketChannelPtr DisconnectEvent::channel()
{
    return _channel;
}
